import Vue from 'vue'
import Router from 'vue-router'
import test from '@/components/test'
import index from '@/components/index'
import login from '@/components/login'
import shouye from '@/components/shouye'
import tuijian from '@/components/tuijian'
import yanzhi from '@/components/yanzhi'
import jishu from '@/components/jishu'
import register from '@/components/register'
import byGame from '@/components/byGame'
import center from '@/components/center'
import uorder from '@/components/uorder'
import playlogin from '@/components/playlogin'
import playindex from '@/components/playindex'
import pcenter from '@/components/pcenter'
import porder from '@/components/porder'
import phoneLogin from '@/components/phoneLogin'
import paySuccess from '@/components/paySuccess'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/test',
      name: 'test',
      component: test
    },
    {
      path: '/phoneLogin',
      name: 'phoneLogin',
      component: phoneLogin
    },{
      path: '/paySuccess',
      name: 'paySuccess',
      component: paySuccess
    },
    {
      path: '/',
      name: 'index',
      component: index,
      redirect:'/shouye',
      children: [
        {
          path: '/shouye',
          name: 'shouye',
          component: shouye,
        },{
          path: '/tuijian',
          name: 'tuijian',
          component: tuijian,
        },{
          path: '/yanzhi',
          name: 'yanzhi',
          component: yanzhi,
        },{
          path: '/jishu',
          name: 'jishu',
          component: jishu,
        },{
          path: '/byGame',
          name: 'byGame',
          component: byGame,
        },{
          path: '/center',
          name: 'center',
          component: center,
        },
        {
          path: '/uorder',
          name: 'uorder',
          component: uorder
        }]
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/playlogin',
      name: 'playlogin',
      component: playlogin
    },
    {
      path: '/playindex',
      name: 'playindex',
      component: playindex,
      redirect:'/pcenter',
      children: [
        {
          path: '/pcenter',
          name: 'pcenter',
          component: pcenter
        },{
          path: '/porder',
          name: 'porder',
          component: porder
        }
      ]
    }
  ]
})
